import java.util.Scanner;
public class zc5201{
   public static void main(String args[]){
     System.out.println("输入第一个数:");
     Scanner scanner1 = new Scanner(System.in);
     double x;
     x = scanner1.nextDouble();
     System.out.println("选择运算法则");
     Scanner scanner2 = new Scanner (System.in);
     String op;
     op = scanner2.next();
     System.out.println("输入第二个数:");
     Scanner scanner3 = new Scanner(System.in);
     double y;
     y = scanner3.nextDouble();
     char z =op.charAt(0);
     if(z=='+')
     System.out.printf("%f",x+y);
     else if(z=='-')
     System.out.printf("%f",x-y);
     else if(z=='*')
     System.out.printf("%f",x*y);
     else if(z=='/'){
     if(y==0){
     System.out.println("Error!");
     }
     else{
     System.out.printf("%f",x/y);
       }
     }
   }
}

